package com.demo2do.fms.entity.vehicle;

import com.demo2do.core.utils.Alias;

/**
 * 车辆状态
 * 
 * @author Wy
 */
@Alias("VehicleStatus")
public enum VehicleStatus {
    
    /** 正常  */
    NORMAL("02","normal", "正常"),
    
    /** 转出 */
    OUT("03","out", "转出");

    private String code;
    
    private String alias;
    
    private String description;

    /**
     * @param code
     * @param alias
     * @param description
     */
    private VehicleStatus(String code,String alias , String description) {
        this.code = code;
        this.alias = alias;
        this.description = description;
    }
    
    /**
     * 
     * @param alias
     * @return
     */
    public static VehicleStatus aliasOf(String alias){
        
        for(VehicleStatus auditStatus : VehicleStatus.values()){
            if(auditStatus.getAlias().equals(alias)){
                return auditStatus;
            }
        }
        
        return null;
        
    }
    
    /**
     * @return code
     */
    public String getCode() {
        return code;
    }
    
    /**
     * @return  alias
     */
    public String getAlias() {
        return alias;
    }
    
    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

}
